package org.nanotek.tika.file;

import org.nanotek.Base;

@SuppressWarnings("serial")
public class FileProcessed implements Base<Long> {
	
	private Long id; 
	private String gid; 
	private String name; 
	private String sortName; 
	private String type; 
	
	private FileIdentity fileIdentity;

	public FileProcessed() {
	}

	@Override
	public Long getId() {
		return id;
	}

	@Override
	public void setId(Long id) {
		this.id = id;
	}

	public String getGid() {
		return gid;
	}

	public void setGid(String gid) {
		this.gid = gid;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getSortName() {
		return sortName;
	}

	public void setSortName(String sortName) {
		this.sortName = sortName;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public FileIdentity getFileIdentity() {
		return fileIdentity;
	}

	public void setFileIdentity(FileIdentity fileIdentity) {
		this.fileIdentity = fileIdentity;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((gid == null) ? 0 : gid.hashCode());
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		result = prime * result + ((name == null) ? 0 : name.hashCode());
		result = prime * result
				+ ((sortName == null) ? 0 : sortName.hashCode());
		result = prime * result + ((type == null) ? 0 : type.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj) {
			return true;
		}
		if (obj == null) {
			return false;
		}
		if (getClass() != obj.getClass()) {
			return false;
		}
		FileProcessed other = (FileProcessed) obj;
		if (gid == null) {
			if (other.gid != null) {
				return false;
			}
		} else if (!gid.equals(other.gid)) {
			return false;
		}
		if (id == null) {
			if (other.id != null) {
				return false;
			}
		} else if (!id.equals(other.id)) {
			return false;
		}
		if (name == null) {
			if (other.name != null) {
				return false;
			}
		} else if (!name.equals(other.name)) {
			return false;
		}
		if (sortName == null) {
			if (other.sortName != null) {
				return false;
			}
		} else if (!sortName.equals(other.sortName)) {
			return false;
		}
		if (type == null) {
			if (other.type != null) {
				return false;
			}
		} else if (!type.equals(other.type)) {
			return false;
		}
		return true;
	}

	@Override
	public String toString() {
		return "FileProcessed [id=" + id + ", gid=" + gid + ", name=" + name
				+ ", sortName=" + sortName + ", type=" + type + "]";
	}

}
